import React from 'react';
import { Input } from 'antd';
import {withRouter} from 'react-router-dom'
const { Search } = Input;

const onSearch = value => console.log(value);

export default withRouter(class Header extends React.Component {

    onFocus=()=>{
        this.props.history.push({
            pathname:'/list',
            state:{
                first:1
            }
        })
    }

    render() {
        return (
            <header className='top-bar clearFix'>
                {/* <div className='logo'></div>
                <h2>欢迎来到，德莱联盟！</h2>
                <div className='search'>
                    <Search placeholder="请输入关键字词"
                        onSearch={onSearch}
                        onFocus={this.onFocus}/>
                </div> */}
            </header>
        )
    }
})
